﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YArchitech.HVAC.AuxiliaryCurve
{
	public class DisCurve : AuxiliaryCurve
	{
		public DisCurve(XYZ minArgu, XYZ maxArgu, double xDisArgu, double yDisArgu, double xSideArgu, double ySideArgu, ExternalCommandData cmdArgu, AuxiliaryCurveType typeArgu, Element elementArgu = null) : base(xSideArgu, ySideArgu, cmdArgu, typeArgu)
		{
			double num = minArgu.DistanceTo(maxArgu);
			if (num > cmdArgu.Application.Application.ShortCurveTolerance && num > xSideArgu && num > ySideArgu)
			{
				this.objectHandle = new OrdinaryHandle(ref minArgu, ref maxArgu, xSideArgu, ySideArgu, false);
				this.objectPointsGet = new DisPointsGet(minArgu, maxArgu, xDisArgu, yDisArgu, ref this.dicX, ref this.dicY);
			}
		}
	}
}
